//
//  AppDelegate.m
//  Learn_ObjectiveC
//
//  Created by 吴可高 on 16/3/21.
//  Copyright (c) 2016年 吴可高. All rights reserved.
//
#import "AppDelegate.h"
#import "AppCacheManager.h"
#import "NSString+Path.h"
#import "NSString+Encode.h"
#import "NSString+Path.h"
#import "User.h"

@interface AppDelegate ()

@end
@implementation AppDelegate

void UncaughtExceptionHandler(NSException * exception)
{
    NSArray * callStack = [exception callStackSymbols];
    NSString * reason = [exception reason];
    NSString * name = [exception name];
    NSString *content = [NSString stringWithFormat:@"========异常错误报告========\nname:%@\nreason:%@\ncallStackSymbols:%@\n",name,reason,[callStack componentsJoinedByString:@"\n"]];
    NSLog(@"exception:%@",content);
};

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [IQKeyboardManager sharedManager].enableAutoToolbar  = NO;
    [IQKeyboardManager sharedManager].keyboardDistanceFromTextField = 20.f;
    [[AFNetworkActivityIndicatorManager sharedManager]setEnabled:NO];
    NSSetUncaughtExceptionHandler(&UncaughtExceptionHandler);
    return YES;
}

@end
